<template>
	<view class="my-search-container" :style="{'background-color': bgcolor}" @click="searchHandler()">
    <view class="my-search-box" :style="{'border-radius': radius+'px'}">
      <uni-icons type="search" size="17"></uni-icons>
      <text class="content">搜索</text>
    </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
    methods:{
      searchHandler(){
        this.$emit('click')
      }
    },
    props: {
      // 背景颜色
      bgcolor: {
        type: String,
        default: '#C00000'
      },
      // 圆角尺寸
      radius: {
        type: Number,
        // 单位是 px
        default: 18
      }
    }
	}
</script>

<style lang="scss">
.my-search-container{
  height: 50px;
  // background-color: #C00000;
  display: flex;
  align-items: center;
  padding: 0 10px;
  .my-search-box{
    height: 36px;
    width: 100%;
    line-height: 36px;
    background-color: #FFFFFF;
    // border-radius: 18px;
    text-align: center;
    .content{
      font-size: 15px;
      margin-left: 5px;
    }
  }
}
</style>
